<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>Document</title>
	</head>
	<body>
		<script type="text/javascript" >

			function Person(name,age){
				this.name = name
				this.age = age
			}
			Person.prototype.speak = function(){
				console.log(`我叫${this.name},我的年龄是：${this.age}`)
			}

			function Student(name,age,grade){
				this.name = name
				this.age = age
				this.grade = grade
			}
			Student.prototype = new Person()

			const s1  = new Student('jerry',2,'小学一年级')
			console.log(s1)
			s1.speak()


		</script>
	</body>
</html>